using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;

public class strings
{
	public static void Main(string[] args)
	{
		// string concatenation
		string school = "Harding "; 
		school = school + "University";   // school is "Harding University"

		// string comparison
		string mascot = "Bisons"; 
		if (mascot == "Bisons")    // Not the correct way to do string comparisons
		if (mascot.Equals("Bisons"))   // true
		if (mascot.EqualsIgnoreCase("BISONS"))   // true
		if (mascot.CompareTo("Bisons") == 0)   // true

		Console.WriteLine(mascot.Substring(2, 5));   // Prints "son"

		// My birthday: Oct 12, 1973
		java.util.Calendar c = new java.util.GregorianCalendar(1973, 10, 12);
		string s = string.format("My birthday: %1$tb %1$te, %1$tY", c);

		// Mutable string 
		stringBuffer buffer = new stringBuffer("two "); 
		buffer.Append("three "); 
		buffer.Insert(0, "one "); 
		buffer.Replace(4, 7, "TWO"); 
		Console.WriteLine(buffer);     // Prints "one TWO three"
	}
}
